<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-4-17
 * Time: 21:37
 */
trait AA{
    public function a(){
        echo "1111111  ";
    }
    public function b(){
        echo "222222  ";
    }
    public function c(){
        echo "333333";
    }
}

trait BB{
    use AA;

    public function d(){
        echo "44444";
    }
}

trait CC{
    use AA;
}

class Test{
    use CC;

    public function e(){
        echo($this->d);
    }
}
$Test = new Test();
$Test -> a();
$Test -> b();
$Test -> c();
